﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MagicBag.CRM.Model;

namespace MagicBag.CRM.IDAL
{
    /// <summary>
    /// 角色菜单数据访问接口
    /// </summary>
    public interface IRoleMenu
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="roleMenu"></param>
        /// <returns></returns>
        int Insert(RoleMenu roleMenu);

        /// <summary>
        /// 根据角色ID,菜单ID删除
        /// </summary>
        /// <param name="roleID"></param>
        /// <param name="menuID"></param>
        /// <returns></returns>
        int Delete(int roleID, int menuID);

        /// <summary>
        /// 删除指定角色ID的所有菜单
        /// </summary>
        /// <param name="roleID"></param>
        /// <returns></returns>
        int Delete(int roleID);

        /// <summary>
        /// 修改角色菜单
        /// </summary>
        /// <param name="roleMenu"></param>
        /// <returns></returns>
        int Update(RoleMenu roleMenu);



        /// <summary>
        /// 获取所有角色菜单
        /// </summary>
        /// <returns></returns>
        IList<RoleMenu> GetRoleMenus();

        /// <summary>
        /// 获取指定角色的所有菜单
        /// </summary>
        /// <param name="roleID"></param>
        /// <returns></returns>
        IList<RoleMenu> GetRoleMenusByRoleID(int roleID);
    }
}
